package Translate;

import Symbol.Symbol;
import Temp.*;
import Util.BoolList;

public class Level {
	public Level parent;
	Frame.Frame frame;
	public AccessList formals;
	public Level(Level parent,Symbol name,BoolList fmls){
		this.parent=parent;
		this.frame=parent.frame.newFrame(new Label(name), new BoolList(true,fmls));
		Frame.AccessList formalList=frame.formals;
		Access f;
		while(formalList!=null){
			f=new Access(this,formalList.head);
			this.formals=new AccessList(f,this.formals);
			formalList=frame.formals.tail;
		}
	};
	
	public Access staticLink(){return formals.head;}
//	public Level (Frame.Frame f);
//	public Access allocLocal(boolean escape){};
}
